package com.ruicar.afs.cloud.apply.pre.loan.mq.sender.service;

import com.ruicar.afs.cloud.apply.common.entity.*;
import com.ruicar.afs.cloud.apply.pre.loan.condition.CaseSubmitInfoCondition;
import com.ruicar.afs.cloud.apply.pre.loan.mq.dto.CaseSbmitInfoDto;
import com.ruicar.afs.cloud.bizcommon.business.entity.FinCostDetails;
import com.ruicar.afs.cloud.bizcommon.business.entity.FinDiscountDetails;
import com.ruicar.afs.cloud.bizcommon.business.entity.FinFinancingItems;
import com.ruicar.afs.cloud.bizcommon.business.entity.FinRentAdjustDetails;
import com.ruicar.afs.cloud.common.modules.dto.mq.approve.*;
import com.ruicar.afs.cloud.common.mq.rabbit.message.AfsTransEntity;
import com.ruicar.afs.cloud.image.entity.ComAttachmentFile;
import com.ruicar.afs.cloud.parameter.commom.entity.TsysVehicleDetail;
import com.ruicar.afs.cloud.parameter.commom.entity.TsysVehicleModel;

import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;

/**
 * 进件申请提交案件MQservice
 *
 * @author 耿继辉
 */
public interface CaseSubmitInfoService {
    /**
     * 数据检查
     */
    CaseSbmitInfoDto checkData(String applyNo);

    /**
     * 退回-进件留言获取
     *
     * @param applyNo
     * @return
     */
    public StringBuilder assemblyData(String applyNo);

    /**
     * mq报文封装
     *
     * @param applyNo 申请编号
     * @return MQ报文
     * @throws ParseException 抛错
     */
    AfsTransEntity<OrderSubmitInfo> returnMessage(String applyNo) throws ParseException;

    /**
     * 案件需要的客户基础信息list
     *
     * @param applyCustBaseInfoList
     * @return
     */
    ArrayList<CaseCustInfoDto> caseCustBaseInfo(List<ApplyCustBaseInfo> applyCustBaseInfoList);

    /**
     * 案件需要的个人客户信息明细
     *
     * @param applyCustBaseInfoList
     * @return
     */
    ArrayList<CaseCustIndividualDto> caseCustIndividualList(List<ApplyCustBaseInfo> applyCustBaseInfoList);

    /**
     * 案件需要的地址明细信息
     *
     * @param applyCustAddressDetailsList
     * @return
     */
    ArrayList<CaseCustAddressDto> caseCustAddressList(List<ApplyCustAddressDetails> applyCustAddressDetailsList);

    /**
     * 案件需要的客户联系人信息明细
     *
     * @param applyCustContactsList
     * @return
     */
    ArrayList<CaseCustContactDto> caseCustContactList(List<ApplyCustContacts> applyCustContactsList);

    /**
     * 案件渠道信息
     *
     * @param applyChannelInfo
     * @param orderInfoByApplyNo
     * @return
     */
    CaseChannelInfoDto caseChannelInfo(ApplyChannelInfo applyChannelInfo, ApplyOrderInfo orderInfoByApplyNo);

    /**
     * 案件需要的案件基本信息
     *
     * @param orderInfoByApplyNo
     * @param applyCustBaseInfoList
     * @param finCostDetailsList
     * @return
     */
    CaseBaseInfoDto caseBaseInfoDTO(ApplyOrderInfo orderInfoByApplyNo, List<ApplyCustBaseInfo> applyCustBaseInfoList, List<FinCostDetails> finCostDetailsList);

    /**
     * 案件需要的车辆信息
     *
     * @param applyCarDetails
     * @param orderInfoByApplyNo
     * @return
     */
    ArrayList<CaseCarInfoDto> caseCarInfoList(ApplyCarDetails applyCarDetails, ApplyOrderInfo orderInfoByApplyNo);

    /**
     * 案件需要的融资信息
     *
     * @param applyCostDetailsList
     * @return
     */
    ArrayList<FinCostDetails> caseCostInfoList(List<FinCostDetails> applyCostDetailsList);

    /**
     * 案件需要的融资项目信息
     *
     * @param list
     * @return
     */
    ArrayList<FinFinancingItems> caseFinancingItemList(List<FinFinancingItems> list);

    /**
     * 案件需要的贴息明细
     *
     * @param list
     * @return
     */
    ArrayList<FinDiscountDetails> caseDiscountDetailList(List<FinDiscountDetails> list);

    /**
     * 案件需要的车型详细信息
     *
     * @param applyCarDetails
     * @param vehicleDetail
     * @param tsysVehicleModel
     * @return
     */
    ArrayList<CaseCarStyleDetailDto> caseCarStyleDetailList(ApplyCarDetails applyCarDetails, TsysVehicleDetail vehicleDetail, TsysVehicleModel tsysVehicleModel);

    /**
     * 影像件
     *
     * @param attachmentFileList
     * @return
     */
    ArrayList<ComAttachmentFileDto> comAttachmentFile(List<ComAttachmentFile> attachmentFileList);

    /**
     * 租金调整信息
     *
     * @param rentAdjustDetailsList
     * @return
     */
    ArrayList<FinRentAdjustDetails> applyRentAdjustDetails(List<FinRentAdjustDetails> rentAdjustDetailsList);

    /**
     * MQ加急
     *
     * @param applyNo 申请编号
     * @return
     * @throws ParseException
     */
    AfsTransEntity<UrgentInfoSubmitInfo> returnEmergencyMessage(String applyNo) throws ParseException;

    /**
     * 资产变更
     *
     * @param applyNo 申请编号
     * @return
     * @throws ParseException
     */
    AfsTransEntity<ApproveSpecialSubmitInfo> returnAssertChangeMessage(String applyNo, List<ComAttachmentFile> fileList) throws ParseException;

    /**
     * 申请复议
     *
     * @param applyNo 申请编号
     * @return
     * @throws ParseException
     */
    AfsTransEntity<ReconsiderationDto> returnSaveReconsiderMessage(String applyNo,List<ComAttachmentFile> fileList) throws ParseException;

    /**
     * 保存复议信息
     *
     * @param condition
     * @throws ParseException
     */
    void saveReconsideration(CaseSubmitInfoCondition condition) throws ParseException;

    /**
     * 撤回
     *
     * @param applyNo 申请编号
     * @return
     * @throws ParseException
     */
    AfsTransEntity<CallBackApplyDto> returnCallBackMessage(String applyNo) throws ParseException;
}
